<!DOCTYPE html>
<html lang="zh-cn">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>lxp_test</title>
		
    <!-- bootstrap.css -->
    <link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css">  
    <!-- jquery -->
    <script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
    <!-- bootstrap.js -->
    <script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
  	<!-- angular -->
  	<script src="http://cdn.static.runoob.com/libs/angular.js/1.4.6/angular.min.js"></script>
  	<!-- jquery-validation 表单验证-->
  	<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
		<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script>
	var app = angular.module("app",[]);
	app.controller("ctrl",function($scope){
			$scope.test = function(v){
				 console.log(v)
				 console.log($scope.z)
			}
	});
	
</script>
  </head>
  <body ng-app="app" ng-controller="ctrl">
    <div>
    	
    	 <input type="checkbox" ng-click="get_checkboxval(a)" name="answer" ng-value="{{a}}" ng-model="a.checked"> {{a.text}}
    	
    		<input type="checkbox" name="z" ng-value="a" ng-model="z" ng-click="test(z)"/>a<br />
    		<input type="checkbox" name="z" ng-value="b" ng-click="test(z)"/>b<br />
    	  <input type="checkbox" name="z" ng-value="c" ng-model="z" ng-click="test(z)"/>c<br />  
    </div>

  <hr />
  
  
  <div>
    <p>My cars:</p>
    <input type="checkbox" ng-model="all"> Check all<br><br>
    <input type="checkbox" ng-checked="all">Volvo<br>
    <input type="checkbox" ng-checked="all">Ford<br>
    <input type="checkbox" ng-checked="all">Mercedes
    <p>点击 "Check all" 选择所有的车。</p>
</div>
  
  </body>
</html>